home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / disk_tools / vdisk / vdisk.doc < prev    next >
Text File  |  1996-03-09  |  15KB  |  327 lines

  1. $VER: vdisk.doc 2.6 (9.3.96)   (C) 1994-1996 by Etienne Vogt
  2.  
  3.  
  4. INTRODUCTION
  5.  
  6.  vdisk.device is a driver for a recoverable RAM disk. It started 2 years ago as
  7. a hack of ASDG-RAM (written by Perry S. Kivolowitz). These hacked versions 
  8. (1.3 -> 1.12) were not distributed.
  9.  As of version 2.0, it has been entirely rewritten, with many new features added :
  10.  
  11.  - Up to 16 units with virtually unlimited size (512 MB)
  12.  - Dynamic memory allocation and (optionnaly) deallocation
  13.  - Full support of all AmigaDOS Filesystems.
  14.  - Will survive the heaviest system crashes as long as its own data is not 
  15.    corrupted.
  16.  - In case of a recovery failure, the cause can be reported by a support command.
  17.  
  18.  VDisk requires AmigaDOS 2.04 or higher (V37). It has been heavily tested on
  19. the following configurations :
  20.  
  21.  - A500 68000 ECS , 1 Mb Chip 2 Mb Fast 1.5 Mb False Fast , WB 3.1
  22.    20 Mb IDE-XT + 170 Mb SCSI HDs
  23.  - A3000 68030 ECS, 2 Mb Chip 8 Mb Fast , WB 2.04 -> 3.1
  24.    100 Mb + 1 Gb SCSI HDs
  25.  - A500 68040(PP&S) ECS , 1 Mb Chip 2 Mb Fast16 8 Mb Fast32 , WB 2.04
  26.    50 Mb SCSI HD
  27.  - A4000 68040 AGA, 2 Mb Chip 8 Mb Fast , WB 3.0
  28.    120 Mb + 500 Mb IDE HDs
  29.  - A4000 68040 AGA, 2 Mb Chip 8 Mb Fast , WB 3.0
  30.    250 Mb IDE HD + 1Gb SCSI-II HDs
  31.  - A1200 68EC020 AGA, 2 Mb Chip 5 Mb Fast , WB 3.0
  32.    60 Mb IDE HD + 100 Mb SCSI HDs
  33.  
  34.  VDisk has been developed independently from StatRam (Another ASDG-RAM based
  35. ram drive written by Richard Waspe and Nicola Salmoria)
  36.  
  37.  
  38. DISTRIBUTION
  39.  
  40.  VDisk is Freely Distributable Copyrighted Software (FreeWare).
  41.  Some restrictions from the original ASDG-RAM package remains :
  42.  
  43.  This package :
  44.  
  45.  - Must be copied only in the form of the original lha archive, as uploaded
  46.    to aminet by the author.
  47.  - May not be distributed by any commercial software or hardware vendor.
  48.  - May not be sold under any guise.
  49.  - Must contain the following copyright information.
  50.  
  51.    vdisk.device, Copyright 1994 by Etienne Vogt.
  52.    Inspired from asdg.vdisk.device, Copyright 1987 by Perry S. Kivolowitz
  53.     (ASDG Incorporated)
  54.  
  55.  Specifically :
  56.  
  57.   No maker or seller of Amiga expansion hardware or software may distribute
  58.  this software in any way. No reseller of public domain software may
  59.  distribute this software either (as this in NOT in the public domain).
  60.   The only acceptable means of distribution is by networks, bbs's and by
  61.  non-profit user groups. Distribution MUST BE FREE (except for media
  62.  costs plus a token amount covering only shipping and handling).
  63.  
  64.  Fred Fish is explicitely allowed to include this package in his AmigaLibDisk
  65.  collection (either on floppy disk or on CD-ROM), as is the aminet group for
  66.  their Aminet CD-ROM.
  67.  
  68.  
  69. DISCLAIMER
  70.  
  71.  This software is provided "as is" without any warranty, either expressed or
  72. implied. By using this software, you accept the entire risk as to its quality
  73. and performance.
  74.  
  75.  
  76. INSTALLATION
  77.  
  78.  - Copy the file 'vdisk.device' to your DEVS: directory .
  79.    NEVER CHANGE THE NAME OF THIS FILE !!!
  80.  
  81.  - Copy the support commands CleanRamDisk, DeleteRamDisk, VDStat to your
  82.    C: directory or whatever you like. You may also copy the .info files.
  83.  
  84.  - If you have OS 2.1 or higher, copy the file VD0 to your DEVS:DOSDrivers
  85.    directory. You may change the name of this file to whatever you want.
  86.    You may edit this file to change some parameters of the recoverable RAM
  87.    disk, such as its maximum size. (see below)
  88.  
  89.  - If you have OS 2.0 , join the file VD0.mountlist to your DEVS:MountList
  90.    file. You may change the name of the mountlist entry to whatever you want.
  91.    You may also edit the mountlist record to change some parameters of the
  92.    recoverable RAM disk (see below). Make sure you do not have another
  93.    entry with the same name in your mountlist (especially if you use the
  94.    old asdg-ram).
  95.    Add a 'Mount VD0:' command to your S:User-Startup. If you have 1 Mb or
  96.    less memory, it may be wise to put this command at the beginning of your
  97.    Startup-Sequence to minimize the risk of recovery failures.
  98.  
  99.  - If you still have OS 1.x, well... It's time to upgrade !
  100.  
  101.  - After that, reboot your Amiga. If all is OK, you should see an icon named
  102.    VD-RAM-00 on your Workbench.
  103.  
  104.    NOTE : If you are upgrading from an earlier version of vdisk.device, you
  105.           *MUST* issue a 'DeleteRamDisk' command on all active units before
  106.           rebooting the system, or unexpected things may happen.
  107.           See the support commands below.
  108.  
  109.  
  110. CHANGING MOUNTFILE PARAMETERS
  111.  
  112.   WARNING : Changing any other MountFile parameter than those listed below will
  113.             cause the vdisk.device to cease to function and to wake up the
  114.             GURU with recoverable alert number $50000005 !
  115.             After changing ANY parameter of an already active unit, you MUST
  116.             issue a 'DeleteRamDisk' command on it before rebooting the system,
  117.             or unexpected things may happen.
  118.  
  119.  - DOS device name : Unlike the original asdg.vdisk.device, you can give any
  120.    name you want to the recoverable RAM disk. Just change the name of the
  121.    mountfile (OS 2.1+) or the mountlist entry (OS 2.0). The default name is
  122.    VD0 . It is recommended that the last character be a digit equal to the 
  123.    unit number.
  124.  
  125.  - Unit : This is the device unit number. You can have several recoverable
  126.    RAM disks by having different mountfiles with different values for this
  127.    keyword. Valid numbers are 0 to 15, giving a possible total of 16 units.
  128.  
  129.  - Flags : Different options may be selected here. You combine them by adding
  130.    their respective value (ex. to enable autocleaning and allocretry, use
  131.    Flags = 3).
  132.     A Flags value of 1 (bit 0 set) will enable autocleaning on the corresponding
  133.    unit. This means that the memory used by the ram disk will automatically
  134.    decrease when you delete files in it. This also implies that you cannot use
  135.    tools like DiskSalv to recover the deleted files. If autocleaning is not
  136.    set, you must use the CleanRamDisk support command to free memory after
  137.    deleting files. Cleaning may still happen if the system runs low on memory.
  138.    It is recommended that you keep AutoCleaning enabled.
  139.     A flags value of 2 (bit 1 set) will enable allocretry. This causes the
  140.    vdisk unit to retry failed memory allocations with less restrictive
  141.    conditions than those specified in the BufMemType parameter. The allocation
  142.    retry will use any public memory available. This is only useful if you have
  143.    set specific memory requirements in the BufMemType parameter (to force use
  144.    of 16 bit fast ram for ex.) and don't want an error to be returned if this
  145.    specific memory type is exhausted.
  146.  
  147.  - HighCyl : This is used to specify the maximum size the recoverable RAM disk
  148.    is allowed to use. When this size is reached, you will get a 'Volume is full'
  149.    requester. Note that unlike RAD, vdisk.device does only allocate memory when
  150.    you write files into it.
  151.    Do not set this too high ! If you run out of memory before reaching the
  152.    maximum size of the RAM disk, you will get a 'write error' requester and
  153.    the files in the RAM disk might become corrupt !!!
  154.    The recommended maximum size is one fourth of your total FAST RAM.
  155.    The HighCyl parameter must be set to an ODD VALUE. HighCyl + 1 is the total
  156.    number of 'virtual tracks' usable by the RAM disk. One virtual track has
  157.    a size of 8 Kb (16 sectors of 512 bytes).
  158.    The default HighCyl value of 63 thus corresponds to a maximum size of
  159.    (63 + 1) * 8 = 512 Kb. For a 2 Mb RAM disk, you will set HighCyl to 255.
  160.    The maximum allowed value is 65533. This corresponds to 512 Mb.
  161.    Remember this value *MUST* be odd !
  162.  
  163.  - Buffers : This is the number of buffers used by the File System to speed up
  164.    disk accesses. With a RAM disk, it may actually slow it down, so you'd
  165.    better not change this.
  166.  
  167.  - BufMemType : Strictly speaking, this is the type of memory used by the
  168.    File System for its internal buffers. For vdisk.device, is also affects
  169.    the type of memory allocated to store data you write into it.
  170.    You can combine different attributes by adding their respective values.
  171.    A value of 1 (MEMF_PUBLIC) means public memory (shared and non virtual)
  172.    and is always used.
  173.    2 (MEMF_CHIP) is chip memory (not recommended).
  174.    4 (MEMF_FAST) is fast memory.
  175.    256 (MEMF_LOCAL) is motherboard memory that should survive a reset. You
  176.    can try to set this flag if vdisk loses its content after reboot.
  177.    512 (MEMF_24BITDMA) is memory accessible via 24 bit addresses. This
  178.    can be 16 or 32 bit RAM though.
  179.    1024 (MEMF_KICK) is memory that can be used at boot time. This is only
  180.    defined in KickStart 3.0+.
  181.     The default value is 5 which means public fast memory.
  182.  
  183.  - DosType : The type of File System used. Possible values are :
  184.     0x444f5300 : Old File System. Slow and not really needed since vdisk.device
  185.                  has its own checksums.
  186.     0x444f5301 : Fast File System. The default.
  187.     0x444f5302 : International Old File System. OS 2.1 + only.
  188.     0x444f5303 : International Fast File System. OS 2.1 +
  189.     0x444f5304 : Directory Caching Old File System. OS 3.0 +
  190.     0x444f5305 : Directory Caching Fast File System. OS 3.0 +
  191.    International mode may be used if you run OS 2.1 or higher. Directory Caching
  192.    is not a good idea since it will slow down the RAM disk.
  193.  
  194.  - Activate : Instructs the mount command to start the device immediately when
  195.    set to 1. If you set it to 0, you must add some command in your Startup
  196.    that accesses VD0 to start it really.
  197.  
  198.  
  199. SUPPORT COMMANDS
  200.  
  201.  CleanRamDisk :
  202.  
  203.    This command is used to force a vdisk unit to free deleted file space. It
  204.   is generally not needed with autocleaning units.
  205.    This command may be used from Workbench (but you can't use the switches).
  206.   Select the virtual disk icon, then double-click on the CleanRamDisk icon.
  207.  
  208.   Usage : CleanRamDisk DEVICE,UNIT/K/N,NOFREECHIP/S,REBUILD/S,FREEBOOT/S
  209.  
  210.   DEVICE : This is the AmigaDOS device name (ex. VD0: )
  211.   UNIT : Alternatively to the AmigaDOS name, you may specify the unit number
  212.          (ex. UNIT 0)
  213.   NOFREECHIP : When BufMemType is set to 1, CleanRamDisk normally attempts to
  214.                free some CHIP memory by relocating virtual tracks located in
  215.                CHIP RAM to FAST RAM. This switch inhibits this behaviour.
  216.   REBUILD : When a vdisk unit has read errors on it (generally caused by some
  217.             bad software that writes over someone else's memory), it will be
  218.             lost at the next reboot (which in this case may come soon).
  219.             This switch forces a rebuild of all internal checksums so that
  220.             the unit will be kept alive after reset. Some data will still be
  221.             bad, but you should be able to save most of it.
  222.   FREEBOOT : If something has been written in the RAM disk's boot blocks
  223.              (unused at this time), virtual track 0 will be locked in memory.
  224.              This switch will mark the boot blocks as free, thus enabling the
  225.              Cleaning routine to flush track 0 out.
  226.  
  227.  DeleteRamDisk :
  228.  
  229.    This command deletes a virtual disk unit entirely (as RemRAD for RAD). All
  230.   memory used is freed and the File System is inhibited. (VD0:BUSY)
  231.    This command may be used from Workbench. Select the virtual disk icon, then
  232.   double-click on the DeleteRamDisk icon. A requester will ask you for confir-
  233.   mation.
  234.    You *MUST* use this command when you change the mountfile parameters of
  235.   an active unit. You must also delete all active units when you upgrade to
  236.   a newer version of vdisk.device. 
  237.  
  238.   Usage : DeleteRamDisk DEVICE,UNIT/K/N
  239.  
  240.   DEVICE : This is the AmigaDOS device name (ex. VD0: )
  241.   UNIT : Alternatively to the AmigaDOS name, you may specify the unit number
  242.          (ex. UNIT 0)
  243.  
  244.  VDStat :
  245.  
  246.    This command is used to get information about a virtual disk unit that
  247.   failed to recover its data after reboot. It is mainly intended for beta
  248.   testers, so it cannot be used from Workbench.
  249.    Recovery error 2 (Root Structure not found) will always show at power-up.
  250.  
  251.   Usage : VDStat DEVICE,UNIT/K/N,FULL/S
  252.  
  253.   DEVICE : This is the AmigaDOS device name (ex. VD0: )
  254.   UNIT : Alternatively to the AmigaDOS name, you may specify the unit number
  255.          (ex. UNIT 0)
  256.   FULL : This switch causes more information to be displayed. It is mainly
  257.          used for debugging purposes.
  258.  
  259.   Recovery error codes :
  260.  
  261.   1 (Deleted Unit) : This will show after reboot when a unit is deleted by
  262.     the DeleteRamDisk command.
  263.   2 (Root structure not found) : This will always show up at power-up. It may
  264.     also happen if something else (like RAD) allocates memory in reverse order
  265.     before vdisk.device starts. To avoid this, always mount a vdisk unit before
  266.     any ramdrive units. Other possibilities are a bad program trashing memory
  267.     or the presence of non reset proof memory in the system (see the known
  268.     problems section).
  269.     This error indicates that all units were lost.
  270.   3 (Bad Root Structure Checksum) : The Root Structure has been corrupted.
  271.     Bad program or memory around ! All units were lost.
  272.   4 (Bad Sector CheckSum) : Either a bad program has trashed your data, or
  273.     you have a memory problem.
  274.   5 (Track not found) : Bad virtual track. This may happen if the unit maximum
  275.     size is set too big, your memory is heavily fragmented or a bad program
  276.     trashed some memory.
  277.   6 (Reallocation Failure) : Everything seems OK, but memory couldn't be
  278.     reallocated with AllocAbs(). This is a bad one that will also wake up
  279.     the guru with recoverable alert number $50010003. If you have access
  280.     to E-Mail, please send a bug report to me (address below).
  281.   7 (Unit Structure not found) : Unit structure got trashed. Bad program or
  282.     memory.
  283.   8 (Bad Unit Structure Checksum) : Corrupted unit structure. Bad Program or
  284.     memory.
  285.   9 (Unknown Error) : How did you get this one ?
  286.  
  287.  
  288. CHANGES
  289.  
  290.  V 2.4 :    First released version.
  291.  
  292.  V 2.5 :      - vdisk now retries failed memory allocations with MEMF_PUBLIC
  293.         when BufMemType was set to allocate a specific type of
  294.         memory. This should cause less write errors.
  295.           - French doc included after numerous requests.
  296.  
  297.  V 2.6 :      - The kludge for safely using $C00000 memory has been entirely
  298.         rewritten. It does no longer cause fragmentation of this
  299.         memory.
  300.           - The Root structure is now allocated in MEMF_KICK memory
  301.         (MEMF_LOCAL for OS 2). This should help vdisk to survive
  302.         reboot on systems with non autoconfig 32bit memory.
  303.           - Added the allocretry Flags option.
  304.           - vdisk will now allow memory flushing to occur when it
  305.         tries to allocate more memory.
  306.  
  307.  
  308. KNOWN PROBLEMS
  309.  
  310.  It seems that certain accelerator boards have 32 bit memory that does
  311. not keep its content after a reset. This will cause vdisk to lose its
  312. files.
  313.  If this happens to you, try to set the BufMemType parameter to 1024
  314. (if you have OS 3+) or 256 (for OS 2) to prevent vdisk from using this
  315. 32 bit memory. Also don't set the allocretry bit in Flags.
  316.  
  317.  
  318. CONTACTING THE AUTHOR
  319.  
  320.  I can be reached by E-Mail at the following address : Etienne.Vogt@obspm.fr
  321.  
  322.   Bug reports must include the complete hardware and software configuration,
  323.  including any third party software that was running in the background.
  324.  
  325.  
  326.                                          Etienne Vogt, 9/3/1996
  327.